package com.tashow.controller;

import com.tashow.domain.Student;
import com.tashow.service.StudentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class StudentController {
    @Resource
    private StudentService studentService;

    @GetMapping("/student/getList")
    @ResponseBody
    public List<Student> getList(){
        List<Student> students = studentService.list();
        System.out.println(students);
        return students;
    }
}
